#ifndef _BARTER_SERVER_ITEST_H_
#define _BARTER_SERVER_ITEST_H_

#include <cstdlib>
#include <string>

extern int errno;

#define FatalAssert(exp, msg) if (!(exp)) { \
	fprintf(stderr, "Fatal assertion (%s) at line %d of %s: %s", #exp, __LINE__, __FILE__, msg); \
	exit(errno); \
}

#define NonFatalAssert(exp, msg) if (!(exp)) { \
	fprintf(stderr, "Non-fatal assertion (%s) at line %d of %s: %s", #exp, __LINE__, __FILE__, msg); \
} else

struct TestInfo
{
	std::string Name;
	int Category;
	std::string CategoryName;
	std::string File;
};

class ITest
{
public:
	virtual bool Run() = 0;
	virtual TestInfo* GetTestInfo() = 0;
};

#endif // _BARTER_SERVER_ITEST_H_
